﻿<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib prefix="admin" tagdir="/WEB-INF/tags/admin"%>
                <span class="title1">转移贴子/span>
                <table class="its" cellpadding="0" cellspacing="1">
                <html:form action="/qm" onsubmit="return migrValidate(this);">
                <html:hidden property="type" value="${type}"/>
                <input type="hidden" name="action" value="confirmmigr"/>
                        <tr>
                            <td colspan="3" align="center">
                                请小心操作,贴子转移后没有撤销功能.<br>
                                选定的[原分类]下的直接下挂贴子被转移到[目标分类],[原分类]下子分类下贴子并不被转移.                                
                            </td>
                        </tr>
                        <tr>
                            <td width="45%" align="left">
                                <b>原分类：</b>
                            </td>
                            <td>&nbsp;</td>
                            <td width="45%">
                                <b>目标分类:</b>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <select name="from" size="32">
                                    <admin:questionsmigration/>
                                </select>
                            </td>
                            <td>&nbsp;</td>
                            <td>
                                <select name="to" size="32">
                                    <admin:questionsmigration/>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3" align="center">
                            <input type="submit" name="transferSubmitButt" value="开始转移">(请慎重操作)
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <input type="button" name="back" value="返 回" onclick="javascript:history.back(1);"/>
                            </td>
                        </tr>
                    </html:form>
                </table>
    <script type="text/javascript">
        function migrValidate(pForm)
        {
            var from = pForm.from.value;
            var to = pForm.to.value;
            if(from == "" || from == null)
            {
                alert("请选择一个[原分类]");
                return false;
            }
            if(to == "" || to == null)
            {
                alert("请选择一个[目标分类]");
                return false;
            }
            if(from == to)
            {
                alert("[原分类]和[目标分类]不能指向同一个分类");
                return false;
            }
            var confirm = window.confirm("确定转移贴子？");
            if(confirm == false)
            {
                return false;
            }
            pForm.transferSubmitButt.disabled = true;
            pForm.transferSubmitButt.value = "正在转移贴子...请稍等";
            return true;
        }
    </script>